﻿using System;
using System.Collections.Generic;

namespace Battle.Engine.LogicModel
{
    public class FExportOnceData : FExport
    {
        public List<FExportValue> values = new List<FExportValue>();//伤害值
        public FActor source;   //出手者
        public FSkillCast cast;//具体的哪一次释放
        public FTalent talent;//具体的哪一个天赋
        public Buff buff;	//BUFF
        public List<Buff> loadBuffs = new List<Buff>();//加载BUFF
        public List<Buff> unloadBuffs = new List<Buff>();//卸载BUFF
        public List<FActor> deadActors = new List<FActor>();//角色死亡

        public FExportOnceData()
        {
            this.values = new List<FExportValue>();
            this.source = null;
            this.cast = null;
            this.talent = null;
            this.buff = null;
            this.loadBuffs = new List<Buff>();
            this.unloadBuffs = new List<Buff>();
            this.deadActors = new List<FActor>();
        }

        public void Init(FSkillCast cast)
        {
            this.source = cast.skill.actor;
            this.cast = cast;
        }

        public void Init(FTalent talent)
        {
            this.source = talent.actor;
            this.talent = talent;
        }

        public void Init(Buff buff)
        {
            if (buff.buffOrigion != null)
            {
                this.source = buff.buffOrigion.GetSourceActor();
            }
            else
            {
                this.source = buff.buffTargetActor;
            }
            this.buff = buff;
        }

        public void Init(FActor actor)
        {
            this.source = actor;
        }
    }
}
